package com.example.shop.persistence.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 快递表
 * </p>
 *
 * @author jason
 * @since 2021-01-19
 */
@TableName("shop_express")
public class Express extends Model<Express> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField("orderID")
    private Integer orderID;

    /**
     * 快递单号
     */
    @ApiModelProperty(value="快递单号")
    @TableField("courierNumber")
    private String courierNumber;

    /**
     * 快递标识
     */
    @ApiModelProperty(value="快递标识")
    @TableField("courierCode")
    private String courierCode;

    /**
     * 快递名称
     */
    @ApiModelProperty(value="快递名称")
    @TableField("courierName")
    private String courierName;

    /**
     * 更新时间
     */
    @TableField("updateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderID() {
        return orderID;
    }

    public void setOrderID(Integer orderID) {
        this.orderID = orderID;
    }

    public String getCourierNumber() {
        return courierNumber;
    }

    public void setCourierNumber(String courierNumber) {
        this.courierNumber = courierNumber;
    }

    public String getCourierCode() {
        return courierCode;
    }

    public void setCourierCode(String courierCode) {
        this.courierCode = courierCode;
    }

    public String getCourierName() {
        return courierName;
    }

    public void setCourierName(String courierName) {
        this.courierName = courierName;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime createTime) {
        this.updateTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Express{" +
        "id=" + id +
        ", orderID=" + orderID +
        ", courierNumber=" + courierNumber +
        ", courierCode=" + courierCode +
        ", courierName=" + courierName +
        ", createTime=" + updateTime +
        "}";
    }
}
